using System.ComponentModel.DataAnnotations;
using SqlSugar;

namespace FytSoa.Domain.Hr;

/// <summary>
/// 排班表
/// </summary>
[SugarTable("hr_row_work")]
public class HrRowWork:EntityBase
{
    /// <summary>
    /// 用户编号
    /// </summary>
    [Required]
    public long EmployeeId { get; set; }
    
    /// <summary>
    /// 员工
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(EmployeeId))]
    public HrEmployee EmployeeObj { get; set; }

    /// <summary>
    /// 类型（1=请假2=年假3=调休）
    /// </summary>
    [Required]
    public int Type { get; set; } = 0;

    /// <summary>
    /// 班次编号
    /// </summary>
    [Required]
    public long ShiftsId { get; set; }
    
    /// <summary>
    /// 班次
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(ShiftsId))]
    public HrShifts ShiftsObj { get; set; }

    /// <summary>
    /// 日期
    /// </summary>
    [Required]
    public DateTime Time { get; set; }
}